<c:if test="true" xmlns:c="http://java.sun.com/jstl/core"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf">
  <c:if test="#{nxl:isLikePlainMode(widget.mode)}">#{blobHolderGenerator.getBlobHolder(field).blob.filename}</c:if>
  <c:if test="#{nxl:isLikeViewMode(widget.mode)}">

    <nxu:set var="folderishStyleClass"
      value="#{nxu:test(field.isFolder(), 'folderishThumbnail', '')}"
      cache="#{!useRepeatRenderTime}">
    <nxu:set var="blobInfo"
      value="#{blobHolderGenerator.getBlobHolder(field).blob.filename}"
      cache="#{!useRepeatRenderTime}">
    <nxu:set var="thumbnailUrl"
      value="#{nxd:fileUrl('downloadThumbnail', field, 'blobholder:0', blobInfo)}"
      cache="#{!useRepeatRenderTime}">
      <div class="thumbnailContainer #{folderishStyleClass}" style="background-image:url(&quot;#{thumbnailUrl}&quot;);" />
    </nxu:set>
    </nxu:set>
    </nxu:set>

  </c:if>
  <c:if test="#{widget.mode == 'pdf'}">

    <nxp:html>
    <nxu:set var="folderishStyleClass"
      value="#{nxu:test(field.isFolder(), 'folderishThumbnail', '')}"
      cache="#{!useRepeatRenderTime}">
    <nxu:set var="thumbnailUrl"
      value="#{nxd:fileUrl('downloadThumbnail', field, 'blobholder:0', blobHolderGenerator.getBlobHolder(field).blob.filename)}"
      cache="#{!useRepeatRenderTime}">
      <div class="thumbnailContainer" style="background-image:url(&quot;#{thumbnailUrl}&quot;);" />
    </nxu:set>
    </nxu:set>
    </nxp:html>

  </c:if>
</c:if>
